import http from "../server";
// 点评数据列表
export const getList = (params) =>
  http.post("/appraise/appraiseComment/selectCommentVoListToH5", params);
// 点评详情
export const getDetail = (appraiseId) =>
  http.get(`/appraise/appraise/getInfo/${appraiseId}`);
// 新增点评数据
export const saveComment = (params) =>
  http.post(`/appraise/appraiseComment/save`, params);
// 修改-新增点赞数据
export const commentLike = (params) =>
  http.post(`/appraise/commentLike/modify`, params);
// 点评综合平均值
export const selectCommentScoreAvg = (appraiseId) =>
  http.get(`/appraise/appraiseComment/selectCommentScoreAvg/${appraiseId}`);
// 更新访问量
export const commentAccessLog = (params) =>
  http.post(`/appraise/commentAccessLog/save`, params);
// 根据父评id论获取子评论
export const childComment = (params) =>
  http.post("/appraise/appraiseComment/selectByParentId", params);
// 获取用户点赞数据
export const getCommentLikeByUser = (params) =>
  http.post("/appraise/commentLike/getCommentLikeByUser", params);
// 获取评论详情
export const getCommentInfo = (commentId) =>
  http.get(`/appraise/appraiseComment/getCommentInfo/${commentId}`);
// 多条件获取指定阵地点评平均分
export const queryAvgScoreByCondition = (params) =>
  http.post("/appraise/appraiseComment/zhzd/queryAvgScoreByCondition", params);
